package com.pkx.cloud.fse7.dms.splitview.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pkx.cloud.fse7.dms.splitview.entity.RpDmsSplitGrantReadView;
import com.pkx.cloud.fse7.dms.splitview.service.RpDmsSplitGrantReadViewService;
import com.pkx.cloud.whzx.comn.ORpose;

import java.text.ParseException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;

/**
 *  控制器
 *
 * @author chenwg
 * @since 2020-10-15
 */
@RestController
@RequestMapping("/splitview/rp-dms-split-grant-read-view")
@Api(value = "分体式门禁按读头报表", tags = "分体式门禁按读头报表")
@Slf4j
@ORpose
public class RpDmsSplitGrantReadViewController {

    @Autowired
    private RpDmsSplitGrantReadViewService rpDmsSplitGrantReadViewService;

    @ApiOperation("分体式门禁按读头分页列表")
    @GetMapping("/page")
    public Page<RpDmsSplitGrantReadView> page(Page page, String startEndtime,String endEndTime,String startBegainTime,String endBegainTime,String readName,String address,String staffName,String tokenId) throws ParseException {
        return rpDmsSplitGrantReadViewService.pageList(page,startEndtime,endEndTime,startBegainTime,endBegainTime,readName,address,staffName,tokenId);
    }

    @ApiOperation("分体式门禁按读头列表")
    @GetMapping("/list")
    public List<RpDmsSplitGrantReadView> list(RpDmsSplitGrantReadView rpDmsSplitGrantReadView) {
        return rpDmsSplitGrantReadViewService.listByEntity(rpDmsSplitGrantReadView);
    }

}
